package com.Hello;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
public class HelloActivity extends Activity {
	private TextView tv1;
	private TextView tv2;
	private TextView tv3;
	
	private LinearLayout layout1;
	private LinearLayout layout2;
	private LinearLayout layout3;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        setupView();
    }
	private void setupView() {
		tv1 =(TextView) findViewById(R.id.tv01);
		tv2 =(TextView) findViewById(R.id.tv02);
		tv3 =(TextView) findViewById(R.id.tv03);
		
		layout1 = (LinearLayout)findViewById(R.id.layout1);
		layout2 = (LinearLayout)findViewById(R.id.layout2);
		layout3 = (LinearLayout)findViewById(R.id.layout3);
		
		tv1.setOnClickListener(new View.OnClickListener() {
			
			public void onClick(View v) {
				layout1.setVisibility(View.VISIBLE);
				layout2.setVisibility(View.GONE);
				layout3.setVisibility(View.GONE);
			}
		});
		
		tv2.setOnClickListener(new View.OnClickListener() {
			
			public void onClick(View v) {
				layout1.setVisibility(View.GONE);
				layout2.setVisibility(View.VISIBLE);
				layout3.setVisibility(View.GONE);
			}
		});
		
		tv3.setOnClickListener(new View.OnClickListener() {
			
			
			public void onClick(View v) {
				layout1.setVisibility(View.GONE);
				layout2.setVisibility(View.GONE);
				layout3.setVisibility(View.VISIBLE);
			}
		});
	}
}